﻿using Bids.Core.Infrastructure;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Telerik.OpenAccess;
using Telerik.OpenAccess.Metadata;
using Telerik.OpenAccess.Metadata.Fluent;
namespace Bids.Core.DomainObjects
{
	/// <summary>
	/// 投稿列表
	/// </summary>
	[Serializable]
    public class Help : IEntity
	{
		public Help()
		{
		    CreateTime = DateTime.Now;
		}
		/// <summary>
		/// 
		/// </summary>
        public virtual int ID { set; get; }
		/// <summary>
		/// 帮助标题
		/// </summary>
        public virtual string Title { set; get; }
		/// <summary>
		/// 帮助内容
		/// </summary>
        public virtual string Content { set; get; }
		/// <summary>
		/// 
		/// </summary>
        public virtual DateTime CreateTime { set; get; }

        public static MappingConfiguration<Help> CreateConfiguration()
        {
            var threadMapping = new MappingConfiguration<Help>();
            threadMapping.MapType(t => new
            {
                t.ID,
                t.Title,
                t.Content,
                t.CreateTime
            }).ToTable("Helps");
            threadMapping.HasProperty(t => t.ID).IsIdentity(KeyGenerator.Autoinc);
           
            return threadMapping;
        }

	}
}

